<SCRIPT type="text/javascript" src="/js/prototype/prototype.js"></SCRIPT>
<form><table cellpadding="0" cellspacing="0" border="0" width="66%">
	<tr>
		<td  width="100%">
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<tr>
					<td align="left" width="25%" style="padding-right:3px;"><input type="text" style="width:100%;"  class="grey" value="Ключевое слово" onfocus="value=''"/></td>
					<td width="25%" style="padding-left:5px;">
						<select  style="width:100%; height:19px;" class="grey">
							<option>По отелям</option>
							<option>2</option>
							<option>3</option>
						</select>
					</td>
					<td width="25%" style="padding-left:5px;">
						<select  style="width:100%; height:19px;"  class="grey">
							<option>Турция</option>
							<option>Египет</option>
							<option>Тайланд</option>
						</select>
					</td>
					<td width="25%" style="padding-left:5px;">
						<select  style="width:100%; height:19px;"  class="grey">
							<option>Хургада</option>
							<option>Шарм</option>
							<option>Таба</option>
						</select>
					</td>
					<td align="right" style="padding-left:5px;"><input type="button" value="Найти" class="but" height="15px"></td>
				</tr>
			</table>
		</td>
	</tr>
</form>
	<tr>
		<td width="100%" style="padding-top:10px;">
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<tr>
					<td colspan="2" align="left" style=" padding-top:10px;">
					<form action="/feedback/savetext" method="POST">
						<table cellpadding="0" cellspacing="0" border="0" width="100%">
							<tr>
								<td colspan="2" height="3px" bgcolor="#B4004A"></td>
							</tr>
							<tr>
								<td colspan="2">
									<table cellpadding="0" cellspacing="0" border="0">
										<tr>
											<td style="padding-left:20px;"valign="top" >
												<table cellpadding="0" cellspacing="0" border="0" width="100%">
													<tr>
														<td class="menu_actyv2" width="250px" height="25px"><a class="a_menu_actyv">Шаг 1<br/>Выберите тип, отель</a></td>
													</tr>
												</table>
											</td>
											<td style=" padding-right:4px; padding-left:4px;" valign="top">
												<table cellpadding="0" cellspacing="0" border="0" width="100%">
													<tr>
														<td class="menu_non2" width="250px" height="25px"><a class="a_menu_non">Шаг 2<br/>Добавить видео</a></td>
													</tr>
												</table>
											</td>
											<td style=" padding-right:20px;" valign="top">
												<table cellpadding="0" cellspacing="0" border="0" width="100%">
													<tr>
														<td class="menu_non2" width="250px" height="25px"><a class="a_menu_non">Шаг 3<br/>Добавить фото</a></td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							
							<tr>
								<td colspan="2" style="padding-top:10px;">
									{foreach from=$ERRORS item=ERROR}
									<div class="error">{$ERROR}</div>
									{/foreach}
								</td>
							</tr>
							
							<tr>
								<td colspan="2" style="padding-top:10px;"><a class="a_menu_non" style="font-weight:bold;">Географическое расположение</a></td>
							</tr>
							<tr>
								<td width="20%" style="padding-top:5px;"><a class="grey">Страна *</a></td>
								<td width="80%" style="padding-top:5px;" align="right">
									{html_options id=country_id class="grey" values=$COUNTRIES_IDS output=$COUNTRIES_NAMES name=m[country_id] style="width:100%; height:19px;" selected=$m.country_id}
								</td>
							</tr>
							<tr>
								<td width="20%" style="padding-top:5px;" valign="top"><a class="grey">Курорт</a></td>
								<td width="80%" style="padding-top:5px;" align="right">
									<div id="resort_div">
									<select name='m[resort_id]' id='resort_id' class='grey' style='width:100%; height:19px;' ><option>выберите курорт</option></select>
									</div>
								</td>
							</tr>
							<tr>
								<td width="20%" style="padding-top:5px;" valign="top"><a class="grey">Отель</a></td>
								<td width="80%" style="padding-top:5px;" align="right">
									<div id="hotel_div">
									<select name='m[hotel_id]' id='hotel_id' class='grey' style='width:100%; height:19px;' ><option>выберите отель</option></select>
									</div>
								</td>
							</tr>
							<tr>
								<td colspan="2" style="padding-top:10px;"><a class="a_menu_non" style="font-weight:bold;">Даты отдыха *:</a></td>
							</tr>
							<tr>
								<td colspan="2">
									<table cellpadding="0" cellspacing="0" width="100%">
										<tr>
											<td width="50%"><a class="grey">с</a>
												<input type="text" id="date_from" name="m[date_from]" value="{$m.date_from}" readonly="readonly">
												<img src="{$fvConfig->get('dir_web_root')}img/calendar_delete.png" width="16" height="16" border="0" class="dateselector_clear" title="очистить дату" onclick="$('date_from').value='';">
    											<img src="{$fvConfig->get('dir_web_root')}img/calendar.png" width="16" height="16" border="0" class="dateselector" id="date_from_pick" title="выбор даты">														
											</td>
											<td width="50%"><a class="grey">по</a>
												<input type="text" id="date_to" name="m[date_to]" value="{$m.date_to}" readonly="readonly">
												<img src="{$fvConfig->get('dir_web_root')}img/calendar_delete.png" width="16" height="16" border="0" class="dateselector_clear" title="очистить дату" onclick="$('date_to').value='';">
    											<img src="{$fvConfig->get('dir_web_root')}img/calendar.png" width="16" height="16" border="0" class="dateselector" id="date_to_pick" title="выбор даты">															
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td colspan="2" style="padding-top:10px;"><a class="a_menu_non" style="font-weight:bold;">Тип отзыва *:</a></td>
							</tr>
							<tr>
								<td colspan="2">
									{html_checkboxes options=$FeedbackTypesManager->htmlSelect('name', null, null, null, null, null, 'grey') labels=false name=m[feedbacktypes_id] selected=$m.feedbacktypes_id separator="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"}
								</td>
							</tr>
							<tr>
								<td colspan="2" style="padding-top:10px;"><a class="a_menu_non" style="font-weight:bold;">Текст отзыва **:</a></td>
							</tr>
							<tr>
								<td colspan="2"><textarea class="grey"  rows="5" style="font-family:Arial, Helvetica, sans-serif; width:98%;" name="m[text]">{$m.text}</textarea></td>
							</tr>
							<tr>
								<td colspan="2" style="padding-bottom:10px;"><a class="grey4">** Вам не обязательно заполнять это поле, если Вы хотите добавить только фото или видео</a></td>
							</tr>
							{if !$LoggedUser}
							<!--начало блока "Забыли пароль"-->
							<!--<tr>
								<td colspan="2" style="padding-top:20px;">
									<table cellpadding="0" cellspacing="0" border="0">
										<tr>
											<td style="padding-left:20px;"valign="bottom" >
												<table cellpadding="0" cellspacing="0" border="0" width="100%">
													<tr>
														<td class="menu_non" width="250px" height="25px"><a href="dobavyt_2.html" class="a_menu_non">Новый пользователь</a></td>
													</tr>
												</table>
											</td>
											<td style=" padding-right:20px; padding-left:4px;" valign="bottom">
												<table cellpadding="0" cellspacing="0" border="0" width="100%">
													<tr>
														<td class="menu_non" width="250px" height="25px"><a  href="dobavyt.html" class="a_menu_non">Зарегистрированный пользователь</a></td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr >
								<td colspan="2" height="3px" bgcolor="#B4004A"></td>
							</tr>
							<tr>
								<td colspan="2" style="padding-bottom:4px;">
									<table cellpadding="0" cellspacing="0" border="0" width="100%" height="77px">
										<tr>
											<td style="padding-top:5px;" colspan="2"><a class="grey">Введите e-mail</a></td>
										</tr>
										<tr>
											<td style="padding-top:5px;" width="50%"><input type="text"  size="59"  class="grey" value="e-mail" onfocus="value=''"/></td><td  style="padding-top:5px;" align="right" width="50%"><input type="button" value="Напомнить пароль" class="but" height="15px"></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr >
								<td colspan="2" height="3px" bgcolor="#B4004A"></td>
							</tr>-->
							<!--конец блока  "Забыли пароль"-->
							<!--начало блока "Зарегистрированный порьзователь"-->
							<tr>
								<td colspan="2" style="padding-top:20px;">
									<table cellpadding="0" cellspacing="0" border="0">
										<tr>
											<td style="padding-left:20px;"valign="bottom" >
												<table cellpadding="0" cellspacing="0" border="0" width="100%">
													<tr>
														<td class="menu_non" width="250px" height="25px"><a href="#" class="a_menu_non">Новый пользователь</a></td>
													</tr>
												</table>
											</td>
											<td style=" padding-right:20px; padding-left:4px;" valign="bottom">
												<table cellpadding="0" cellspacing="0" border="0" width="100%">
													<tr>
														<td class="menu_actyv" width="250px" height="25px"><a href="#" class="a_menu_actyv">Зарегистрированный пользователь</a></td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr >
								<td colspan="2" height="3px" bgcolor="#B4004A"></td>
							</tr>
							<tr>
								<td colspan="2" style="padding-bottom:4px;">
									<table cellpadding="0" cellspacing="0" border="0" width="100%" height="77px">
										<tr>
											<td style="padding-top:5px;"><a class="grey">Логин:</a></td><td style="padding-top:5px;" align="right"><input type="text"  size="59" style="width:318px;" class="grey" name='login[login]' value="Логин" onfocus="value=''"/></td>
										</tr>
										<tr>
											<td style="padding-top:5px;"><a class="grey">Пароль:</a></td><td  style="padding-top:5px;" align="right"><input type="password"  size="59" style="width:318px;" class="grey" name='login[password]' value="Пароль" onfocus="value=''"/></td>
										</tr>
										<tr>
											<td colspan="2" style="padding-top:5px;" align="right"><a href="#" class="grey2">Забыли пароль?</a></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr >
								<td colspan="2" height="3px" bgcolor="#B4004A"></td>
							</tr>
							<!--конец блока "Зарегистрированный порьзователь"-->
							<!--начало блока "Незарегистрированный порьзователь"-->
							<!--<tr>
								<td colspan="2" style="padding-top:20px;">
									<table cellpadding="0" cellspacing="0" border="0">
										<tr>
											<td style="padding-left:20px;"valign="bottom" >
												<table cellpadding="0" cellspacing="0" border="0" width="100%">
													<tr>
														<td class="menu_actyv" width="250px" height="25px"><a href="dobavyt_2.html" class="a_menu_actyv">Новый пользователь</a></td>
													</tr>
												</table>
											</td>
											<td style=" padding-right:20px; padding-left:4px;" valign="bottom">
												<table cellpadding="0" cellspacing="0" border="0" width="100%">
													<tr>
														<td class="menu_non" width="250px" height="25px"><a href="dobavyt.html" class="a_menu_non">Зарегистрированный пользователь</a></td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr >
								<td colspan="2" height="3px" bgcolor="#B4004A"></td>
							</tr>
							<tr>
								<td colspan="2" style="padding-bottom:4px;">
									<table cellpadding="0" cellspacing="0" border="0" width="100%" height="77px">
										<tr>
											<td style="padding-top:5px;"><a class="grey">Логин:</a></td><td style="padding-top:5px;" align="right"><input type="text"  size="59"  class="grey" value="Логин" onfocus="value=''"/></td>
										</tr>
										<tr>
											<td style="padding-top:5px;"><a class="grey">Пароль:</a></td><td  style="padding-top:5px;" align="right"><input type="password"  size="59"  class="grey" value="E-mail" onfocus="value=''"/></td>
										</tr>
										<tr>
											<td  style="padding-top:5px;"><a class="grey">E-mail:</a></td>
											<td  style="padding-top:5px;" align="right"><input type="text"  size="82"  class="grey" value="E-mail" onfocus="value=''"/></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr >
								<td colspan="2" height="3px" bgcolor="#B4004A"></td>
							</tr>-->
							<!--конец блока "Незарегистрированный пользователь"-->
							{/if}
							<tr>
								<td colspan="2" style="padding-top:5px;"><input type="checkbox" name="m[accept_rules]" {if $m.accept_rules == 'on'}checked{/if} >&nbsp;&nbsp;&nbsp;<a class="grey">Я ознакомился с </a>&nbsp;<a href="javascript:myFunctyon()" class="red">правилами размещения.*</a></td>
							</tr>
							<tr>
								<!--<td style="padding-top:20px;" align="left"><input type="reset" value="Сброс" class="but" height="15px"></td>-->
								<td colspan="2" style="padding-top:20px;" align="right">
									<input type="submit" value="Добавить отзыв" class="but" height="15px" onclick="$('redirect').value=''">
									<input type="submit" value="Сохранить и продолжить" class="but" height="15px" onclick="$('redirect').value='video'">
									<input type="hidden" id="redirect" name="redirect" value="" />
								</td>
							</tr>
							<tr>
								<td colspan="2" align="left" style="padding-top:10px;"><a class="grey4">* - отмечены обязательные для заполнения поля. <br/>Кнопкой "добавить отзыв" вы може прекратить добавление отзыва на любом шаге</a></td>
							</tr>
						</table>
					</form>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
{literal}
<script>
function ourDateStatusFunc(date, y, m, d) {
	var	startDate =	new	Date();
    if (startDate < date)
      return true;
    else
      return false; // other dates are enabled
    //   return true;//if you want to disable other dates
  };

    Calendar.setup({
        inputField : "date_from",
        ifFormat : "%Y-%m-%d",
        button : "date_from_pick",
        align : "Bl",
        firstDay: 1,
        showsTime: false,
        singleClick : true,
        dateStatusFunc : ourDateStatusFunc
    });
    Calendar.setup({
        inputField : "date_to",
        ifFormat : "%Y-%m-%d",
        button : "date_to_pick",
        align : "Bl",
        firstDay: 1,
        showsTime: false,
        singleClick : true,
        dateStatusFunc : ourDateStatusFunc
    });


function doChangeResort(e) {
	var ajax = new Ajax.Updater(
		'hotel_div',
		"{/literal}{$fvConfig->get('dir_web_root')}feedback/changeresort{literal}",
		{
			parameters : "resort_id="+$("resort_id").value,
			asynchronous:true,
			onComplete: function () {
			}
		}
	);
}

function doChangeCountry(e) {
	var ajax = new Ajax.Updater(
		'resort_div',
		"{/literal}{$fvConfig->get('dir_web_root')}feedback/changecountry{literal}",
		{
			parameters : "country_id="+$("country_id").value,
			asynchronous:true,
			onComplete: Event.observe($("resort_id"), "change", doChangeResort, true)
		}
	);
}
Event.observe($("country_id"), "change", doChangeCountry, false);
Event.observe($("resort_id"), "change", doChangeResort, false);
</script>
{/literal}